﻿using Abp.Domain.Repositories;
using Abp.EntityFrameworkCore;
using Abp.Net.Sms;
using Abp.Runtime.Caching;
using HCD.Const;
using HCD.Entities;
using Partner.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HCD.DomainServices.Mdt
{
    public class MdtGroupManager : EnterpriseDomainServiceBase, IMdtGroupManager
    {
        public IRepository<MdtGroup, long> MdtGroupRep { get; set; }
        public IRepository<MdtGroupUser, long> MdtGroupUserRep { get; set; }
        
        public async Task DeleteMdtGroup(long id)
        {
            await MdtGroupRep.DeleteAsync(id);
            await MdtGroupUserRep.DeleteAsync(m => m.GroupId == id);
            
        }
    }
}
